<!DOCTYPE html>
<html lang="zh-CN">
<meta charset="utf-8">
<body>
	<div>
		<table class="table table-striped table-hover table-bordered ">
			<tr><th>序号</th><th>类型</th><th>标题</th><th>内容</th><th>图片</th><th>状态</th><th>操作</th><th>发帖人</th><th>发帖时间</th><th>操作</th></tr>
			<tr th:each="postVo,s : ${page.data}" th:if="${#lists.size(page.data)} gt 0">
				<td th:text="${(page.pageNum - 1) * page.pageSize + (s.index + 1)}"></td>
				<td th:text="${postVo.typeName}"></td>
				<td th:text="${postVo.post.postTitle}"></td>
				<td th:text="${postVo.post.postContent}"></td>
				<td>
					<img alt="" th:src="${postVo.post.postImg}">
				</td>
				<td th:id="${postVo.post.id}" th:switch="${postVo.post.postStatus}">
                    <span style="padding:5px;display:inline-block" th:case="1">已通过</span>
                    <span style="padding:5px;display:inline-block" th:case="0">未通过</span>
                </td>
                <td>
                	<a class="btn btn-warning" th:onclick="'javascript:examinePost('+${postVo.post.id}+','+0+')'">不通过</a>&nbsp;&nbsp;
                    <a class="btn btn-primary" th:onclick="'javascript:examinePost('+${postVo.post.id}+','+1+')'">通&nbsp;&nbsp;过</a>&nbsp;&nbsp;
                </td>
				<td th:text="${postVo.userName}"></td>
				<td th:text="${#dates.format(postVo.post.createTime, 'yyyy-MM-dd HH:ss')}"></td>
				<td>
					<a class="btn btn-danger" th:onclick="'javascript:delPost('+${postVo.post.id}+')'">删除</a>
				</td>
			</tr>
			<tr th:if="${#lists.size(page.data)} eq 0">
				<td colspan="10" align="center">无数据</td>
			</tr>
		</table>
	</div>
	<div>
		<nav aria-label="...">
		  <ul class="pager">
		    <li><a href="#" th:onclick="'javascript:prePage('+${page.pageNum}+','+${page.total}+')'">上一页</a></li>
		    <li><a href="#" th:onclick="'javascript:nextPage('+${page.pageNum}+','+${page.total}+')'">下一页</a></li>
		  </ul>
		</nav>
	</div>
</body>
</html>